The present invention relates to a computer graphics display system and, more particularly, to a method and apparatus for performing polygon anti-aliasing in a computer graphics display system.
In three-dimensional (3-D) computer graphics display systems, primitives are rendered on a display device of the computer graphics display system to produce a visual image on the display device. Computer graphics workstations are used for a number of different applications such as computer-aided design (CAD) and computer-aided manufacturing (CAM). These applications often require three dimensional (3D) modeling capability and great speed in rendering complicated models.
One possible embodiment of a computer graphics accelerator is shown in FIG. 2. This system is described in detail below. For now, note that the scan converter 206 receives vertex data and plane equations from the front end and turns them into spans of pixels. Scan conversion is a process that determines the exact pixel locations on the screen of a display device that correspond to graphics primitives. Scan conversion is commonly performed by an edge stepper engine that steps down along the edges of a primitive until a point on the edge of the primitive is reached where the primitive intersects a scan line, and then steps across the span corresponding to the scan line to determine the point of the opposite side of the primitive where the scan line intersects the primitive.
One disadvantage of the typical approach to performing scan conversion is that it results in one-dimensional locality of pixels because of the manner in which an entire span of pixels are obtained for a scan line in the x direction (i.e., horizontal), before the next span of pixels is obtained for the next scan line. This results in one-dimensional grouping of pixels, i.e., grouping in terms of the x dimension in screen space. This is a less than optimal structure for storing pixel data since pixels that may be adjacent vertically are stored far from each other, and may require substantial calculations to convert the one-dimensional array of pixels into a configuration enabling fast access along both the horizontal and vertical dimensions.
Also, a common method of scan conversion through edge stepping may leave the edge of the primitive in a state with aliasing along the edges. Anti-aliasing of the edge would have to be performed later in the graphics hardware pipeline. Standard anti-aliasing techniques may be used to reduce this problem. However, many of the better techniques are computation intensive, requiring either more hardware or more time for processing. Thus, there is a need in the art for techniques that improve the quality of the image while keeping computing time to a minimum.
Image data is selectively over-sampled to produce quality images comparing favorably to full over-sampling techniques, while requiring less computation than full over-sampling techniques. A hierarchical tiler performs edge calculations for any given polygon, pixels are selectively over-sampling along the edge. This improves image quality by anti-aliasing the polygon edges, with a small increase in computation time or hardware when compared to other techniques.
Other aspects and advantages of the present invention will become apparent from the following detailed description, taken in conjunction with the accompanying drawings, illustrating by way of example the principles of the invention.